<template>
  <div>

      <el-button @click="begin" type="success" plain>开始活动</el-button>

  </div>


</template>

<script>
  export default {
    name: 'Start',

    methods:{
      begin:function () {
          this.id = JSON.parse(sessionStorage.getItem("user")).id;
          this.$http.post('goods/doBeginGrab?userId='+this.id).then((res)=>{
            if (res.data.success) {
              this.$message({
                message: res.data.message,
                type: 'success'
              });
            }else {
              this.$message({
                message: res.data.message,
                type: 'error'
              });
            }
          })
      }
    }
  }
</script>

<style scoped>

</style>
